﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcCreditoHipotecario.Controllers
{
    public class ReniecController : Controller
    {
        //
        // GET: /Reniec/


        public ActionResult Index()
        {
            return View(Models.ReniecModels.ObtenerReniecPersonas());
        }

        [HttpPost]
        public ActionResult Index(string Documento)
        {
            var persona = Models.ReniecModels.ObtenerReniecPersonas();
            if (!string.IsNullOrEmpty(Documento))
            {
                persona = Models.ReniecModels.ObtenerReniecPersonasDocumento(Documento);
            }
           
            return PartialView("_gridReniec", persona);

        }

    }
}
